package com.budwk.app.miniapp.utils;

import cn.hutool.http.HttpUtil;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;

public class WxMiniUtil {
    private static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
    private static final String TEMPLATE_MESSAGE_URL = "https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send?access_token=ACCESS_TOKEN";
    private static final String APPID = "wx03d69fde959604e1";
    private static final String APPSECRET = "31d770915c6550b8db12c7a4448ef562";
    @Data
    public class SendModel{
        private String access_token;
        private String template_id;
        private String page;
        private String touser;
        private String data;
        private String miniprogram_state;
        private String lang;

    }


    @Data
    public class Semplate01{
        private String time1;
        private String thing2;
        private String thing3;


    }
    public  void sendMessage(SendModel sendModel){

    }
}
